Skip to content

Add EVM support#299

Draft
akobrin1 wants to merge 13 commits into
masterfrom
evm-support
Draft

Add EVM support#299
akobrin1 wants to merge 13 commits into
masterfrom
evm-support

Conversation

@akobrin1
Copy link
Copy Markdown
Contributor

@akobrin1 akobrin1 commented May 27, 2026

Summary

This PR adds broad EVM support across supernode, SDK, CLI, and supporting modules, then brings the branch current with master. The migration tooling is one part of the branch, but the overall change is larger: it updates account/key handling, Lumera dependencies, client interfaces, signing paths, and operator workflows for the EVM-enabled Lumera stack.

What changed

  • Switched new/recovered supernode keyring accounts to EVM-compatible eth_secp256k1 keys and the EVM coin type 60 derivation path (m/44'/60'/0'/0/0).
  • Registered Cosmos EVM crypto interfaces so the keyring can store and load the new key type while retaining compatibility with existing keyring behavior.
  • Updated private key derivation, account recovery, and signing-related tests to validate deterministic EVM key generation and distinguish it from legacy Cosmos secp256k1 accounts.
  • Updated Lumera client, codec, bank, SDK task, and test utility interfaces for the EVM-enabled Lumera dependency set.
  • Added EVM migration support through the evmigration supernode command, including proof generation/validation coverage and integration tests.
  • Added operator documentation in docs/evm-migration.md for the migration workflow.
  • Added safety handling so automatic migration is refused for multisig legacy accounts.
  • Aligned dependency manifests across the root module, cmd/sncli, sn-manager, and tests/system with the EVM-enabled Lumera stack.
  • Included the latest master changes via merge commit 25589ad, including the host reporter storage-full compatibility updates from 80ecbb7.

Why

The EVM-enabled Lumera path requires supernode and related tools to produce and understand EVM-compatible account keys, updated signing/proof payloads, and the newer Lumera module APIs. Without these changes, operators and developers would only have partial migration tooling, while normal account creation/recovery and SDK flows would still use the legacy key model.

User and developer impact

  • New supernode accounts are created as EVM-compatible accounts by default.
  • Recovered accounts use the EVM derivation path and key type, producing deterministic EVM-compatible addresses from the provided mnemonic.
  • Developers get updated interfaces and tests around EVM key handling, proof generation, balance checks, and signing helpers.
  • Operators get a documented evmigration workflow for preparing migration proofs.
  • Multisig legacy accounts are not migrated automatically, which avoids silently applying an unsafe migration path.
  • Downstream module users should expect dependency updates in all affected Go modules.

Validation

  • go test ./... passed locally from the repository root on 2026-05-27.

Notes

This is the broader EVM support branch, not only an EVM migration PR. The migration command and docs are included because they are part of the operator path for adopting the EVM-enabled stack.

akobrin1 and others added 11 commits April 21, 2026 15:10
Supernode's startup migration path holds a single signing key and cannot
run the K-of-N ceremony required for a multisig legacy account. Detect
is_multisig=true from MigrationEstimate and return an actionable error
pointing to lumerad's 4-step offline flow (generate-proof-payload →
sign-proof → assemble-proof → submit-proof). After the operator completes
the offline ceremony, the next restart finds the on-chain MigrationRecord
and drives local cleanup through the existing alreadyMigrated branch —
no new multisig-aware code in the daemon.

Also log the new is_multisig/threshold/num_signers fields from
QueryMigrationEstimate in the pre-flight summary, and bump the lumera
pseudo-version pin to origin/evm HEAD (e09830d70704) so a clean checkout
without ../lumera still resolves to a version that has the LegacyProof
oneof, SingleKeyProof/MultisigProof types, and MaxMultisigSubKeys param.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
sncli transitively depends on lumera's app package (via
x/lumeraid/securekeyx tests), which pulls in cosmos/evm's
statedb → github.com/ethereum/go-ethereum/trie/utils. Upstream
go-ethereum doesn't export that package; cosmos/evm requires the
cosmos/go-ethereum fork. The main go.mod already has this replace;
mirror it here so `go build ./...` from cmd/sncli resolves.

Bump the lumera require to the pseudo-version at origin/evm HEAD
(was v1.11.0 from before the EVM work) and let go mod tidy refresh
the rest of the indirect graph to match the root module.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Lumera unified legacy and new sides under a single MigrationProof oneof.
Wrap newSig in a SingleKeyProof and pass it via NewProof on both
MsgMigrateValidator and MsgMigrateAccount.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts:
#	.gitignore
#	go.mod
#	go.sum
#	p2p/kademlia/bootstrap.go
#	p2p/kademlia/dht.go
#	supernode/supernode_metrics/reachability_active_probing_test.go
#	tests/system/go.mod
#	tests/system/go.sum
- Bump cmd/sncli and tests/system to lumera v1.20.0-rc2; drop local
  ../lumera replace now that the EVM-enabled release exists upstream.
- tests/system: bump devnet tx fee to 1000ulume and make initSDKConfig
  idempotent so multiple test invocations don't trip the SDK's "Config
  is sealed" panic.
- CHANGELOG: add Upcoming EVM Release section summarising the
  evm-support work (migration flow, keyring, p2p reactions, deps).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@akobrin1 akobrin1 changed the title [codex] Add EVM migration support EVM support May 27, 2026
@akobrin1 akobrin1 changed the title EVM support EVM migration support May 27, 2026
@akobrin1 akobrin1 changed the title EVM migration support [codex] Add EVM support May 27, 2026
@akobrin1 akobrin1 changed the title [codex] Add EVM support Add EVM support May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant